<?php
/**
* VVBINH
* binhvuong@vietnambiz.com
*/
function arr_to_obj($array) {
		if(!is_array($array)) {
			return $array;
		}
		$object = new stdClass();
		if (is_array($array) && count($array) > 0) {
		  foreach ($array as $name=>$value) {
		     $name = strtolower(trim($name));
		    
		     $object->$name = arr_to_obj($value);
		    
		  }
	      return $object;
		}
	    else {
	      return FALSE;
	    }
}

function create_link($txt = '')
{
    $txt = utf8_to_ascii($txt);
    $txt = preg_replace('@[^\w]@is', ' ', strtolower($txt));
    $txt = str_replace(' ', '-', trim($txt));
    return $txt;
}